import request from '@/utils/request'

// 查询轮播图列表
export function listBanner(query) {
    return request({
        url: '/business/banner/list',
        method: 'get',
        params: query
    })
}

// 获取轮播图链接下拉选项
export function listSelectPath() {
    return request({
        url: '/business/competition/keyValue',
        method: 'get'
    })
}

// 查询轮播图详细
export function getBanner(bannerId) {
    return request({
        url: '/business/banner/' + bannerId,
        method: 'get'
    })
}

// 新增轮播图
export function addBanner(data) {
    return request({
        url: '/business/banner',
        method: 'post',
        data: data
    })
}

// 修改轮播图
export function updateBanner(data) {
    return request({
        url: '/business/banner',
        method: 'put',
        data: data
    })
}

// 删除轮播图
export function delBanner(bannerId) {
    return request({
        url: '/business/banner/' + bannerId,
        method: 'delete'
    })
}
